
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
       function Person(name,sex,age){
           this.name = name 
           this.sex = sex 
           this.age = age
       }
       Person.prototype.speak = function(){
           console.log("在说话");
       }
       function Student(score,name,age,sex){
            this.score = score
            Person.call(this,name , age ,sex)
       }
       Student.prototype = new Person()
       var stu = new Student(100,'feng',19,'man') // 要和构造函数一一对应。
       console.log(stu);
       
    </script>
</body>
</html>